{% extends 'PortalMainBundle::layout.html.twig' %}

{% block stylesheets %}
  {{ parent() }}
{% endblock %}
{% block javascripts %}
  {% include 'PortalTutorBundle::TutorStep/includeStepJs.html.twig' %}      

{% endblock %}
{% block content %}

  {% include 'PortalTutorBundle::TutorStep/stepHeader.html.twig' with {'step' : 1 } %}   
<div class="span12">
    <h3 class="heady">Та заах хичээлээ сонгоно уу.</h3>
    <br>
    <br>
    <form action="{{path('step1submit')}}" method="POST">
        <div class="accordion" id="accordion535"> 
    {% for subjectCategory in subjectCategoryList %}
                <div class="accordion-group"> 
                    <div class="accordion-heading"> 
                        <a data-toggle="collapse" href="#{{subjectCategory.NAME}}Container" class="accordion-toggle active" data-parent="#accordion535">
                            <span class="entypo plus metaIcon"><i></i></span>
          {{subjectCategory.NAME}}
                                </a> 
                            </div> 
                            <div class="accordion-body in collapse" id="{{subjectCategory.NAME}}Container" style="height: auto;"> 
                                <div class="accordion-inner">
          {% if subjectCategory.child is not null %}
                                        <table>
              {% set counter = 1 %}
              {% for child in subjectCategory.child %}

                {% if counter in [1, 2, 3, 4, 5] %}
                                                <td>
                                                    <label>
                                                        <input type="checkbox" name="subjects[]" value="{{child.ID}}">&nbsp;{{child.NAME}}
                                                    </label>
                                                </td>
                    {% set counter = counter + 1 %}
                {% else %}
                    {% set counter = 1 %}
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <label>
                                                            <input type="checkbox" name="subjects[]" value="{{child.ID}}">&nbsp;{{child.NAME}}
                                                        </label>
                                                    </td>
                {% set counter = counter + 1 %}
                {% endif %}
              {% endfor %}
                                            </table>
          {% endif %}
                                        </div> 
                                    </div>       
                                </div>   
    {% endfor %}
                            </div>

                            <br />
                            <br />
                            <div class="controllerContainerDiv">
                                <div>
                                    <a class="btn btn-info" href="javascript:;" onclick="skip()" rel="nofollow">Түр алгасах</a>                
                                    <input type="submit" class="btn btn-success" value="Хадгалах">
                                </div>
                            </div>
                        </form>
                    </div>


{% endblock %}